<?php

namespace app\common\model\work_area;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * 项目线
 */
class ProjLine extends Model
{
    use SoftDelete;

    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    // 设置json类型字段
    protected $json = ['line_arr','line_style'];

    // 设置JSON数据返回数组
    protected $jsonAssoc = true;


    /**
     * 1对多关联工区
     * @return \think\model\relation\HasMany
     */
    public function workAreaList()
    {
        return $this->hasMany(WorkArea::class, 'proj_line_id');
    }


}